<?php
header('Content-Type:application/json; charset=utf-8');

/**
 * location / {
 *  try_files $uri $uri/ /index.php?$query_string;
 * }
 **/

// Autoload 自动载入
require '../vendor/autoload.php';
require '../core/database.php';
include '../core/utils.php';

use NoahBuscher\Macaw\Macaw;
use Illuminate\Database\Capsule\Manager as DB;

Macaw::get('fuck', function () {
    $user = DB::table('admin')->get();
    Json($user, 300);
});

Macaw::get('(:all)', function ($fu) {
    echo '未匹配到路由<br>' . $fu;
});

Macaw::dispatch();
